package com.dgut.service.impl;

import com.dgut.dao.RecordDao;
import com.dgut.entity.Record;
import com.dgut.service.RecordService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class RecordServiceImpl implements RecordService {
    @Resource
    RecordDao recordDao;

    @Override
    public Record getRecordByStuIdAndDate(String stuId, String date) {
        return recordDao.getRecordByStuIdAndDate(stuId, date);
    }

    @Override
    public List<Record> getRecordBySchool(String school) {
        return recordDao.getRecordBySchool(school);
    }

    @Override
    public List<Record> getRecordByDate(String date) {
        return recordDao.getRecordByDate(date);
    }

    @Override
    public List<Record> getRecordBySchoolAndDate(String school, String date) {
        return recordDao.getRecordBySchoolAndDate(school, date);
    }

    @Override
    public void insertRecord(Record record) {
        recordDao.insertRecord(record);
    }
}
